﻿<Window x:Class="AxesTest.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 	xmlns:parts="clr-namespace:OpenWPFChart.Parts;assembly=OpenWPFChart.Parts"
	Title="Axes Test" SizeToContent="WidthAndHeight">

	<Window.InputBindings>
		<KeyBinding Key="Add" Modifiers="Control" CommandParameter="1.2" Command="NavigationCommands.Zoom" />
		<KeyBinding Key="Subtract" Modifiers="Control" CommandParameter="-1.2" Command="NavigationCommands.Zoom" />
	</Window.InputBindings>
	<Window.CommandBindings>
		<CommandBinding Command="NavigationCommands.Zoom" Executed="ZoomExecutedCommandHandler"/>
	</Window.CommandBindings>
	
	<Window.Resources>
		<DataTemplate DataType="{x:Type parts:ChartLinearScale}">
			<parts:LinearAxis AxisScale="{Binding}"/>
		</DataTemplate>
		<DataTemplate DataType="{x:Type parts:ChartLogarithmicScale}">
			<parts:LogarithmicAxis AxisScale="{Binding}"/>
		</DataTemplate>
	</Window.Resources>

	<DockPanel>
		<!-- Menu -->
		<Menu DockPanel.Dock="Top">
			<MenuItem Header="_File">
				<MenuItem Header="_Exit" Click="Exit_Click"/>
			</MenuItem>
			<MenuItem Header="_View">
				<MenuItem Header="Properties" Click="Properties_Click"/>
				<Separator/>
				<MenuItem Header="Zoom_In (Ctrl+NumPad+)" Command="Zoom" CommandParameter="1.2"/>
				<MenuItem Header="Zoom_Out (Ctrl+NumPad-)" Command="Zoom" CommandParameter="-1.2"/>
			</MenuItem>
		</Menu>
		
		<!--Axis host-->
		<ContentControl Name="axisHost" Content="{Binding}"/>
	</DockPanel>
</Window>
